import java.util.Scanner;
//求数组中任意两个下标间元素的和
public class Solution {
    public int sumFunction(){
        Scanner scanner = new Scanner(System.in);
        int[] arr = new int[]{0,1,2,3,4,5,6,7,8,9,10};
        int l = scanner.nextInt();
        int r = scanner.nextInt();
        int L = arr.length;
        int[] dp = new int[L];
        for (int i = 1; i < L; i++) {
            dp[i] = dp[i-1] + arr[i];
        }
        int num = dp[r] - dp[l-1];
        return num;
    }

    public static void main(String[] args) {
        Solution solution = new Solution();
        System.out.println(solution.sumFunction());
    }
}
